package BehaviorDesignPattern.InterpreterPattern;

import BehaviorDesignPattern.InterpreterPattern.Interfase.Expression;

// 终结表达式类，表示具体的数值
class NumberExpression implements Expression {
    private int number;

    public NumberExpression(int number) {
        this.number = number;
    }

    @Override
    public int interpret() {
        return number;
    }
}